package com.dalin.platform.autocode.action;

import com.dalin.framework.action.StrutsTwoAction;
import com.dalin.platform.loa.service.OperateService;
import com.dalin.platform.loa.vo.LoaOperateVo;
/*****************************************************************************
 * @content: 类信息                                                                                                                                *
 * @author : 那建林                                                                                                                                 *
 * @crtDate: 2011-03-10 09:51:15                                            *
 * @modDate: 2011-03-10 09:51:15                                            *
 * @version: 1.00                                                           *
 ****************************************************************************/
public class LoaOperateAddModAction extends StrutsTwoAction{
	private OperateService operateService; // 
    private LoaOperateVo vo; // 

    public String execute()throws Exception {
        super.printInfo("", "===== this action begin");
        try {
        	 if (vo.getOperateId() == null) {
                 operateService.addLoaOperate(vo);
             } else {
                 operateService.modifyLoaOperate(vo);
             }
        	 setResContent(true, "");
        } catch (Exception e) {
        	e.printStackTrace();
        	setResContent(e);
        }
        super.printInfo("", "===== this action end");
        return null;

    }



    public OperateService getOperateService() {
		return operateService;
	}
	public void setOperateService(OperateService operateService) {
		this.operateService = operateService;
	}

	public LoaOperateVo getVo() {
        return vo;
    }

    public void setVo(LoaOperateVo vo) {
        this.vo = vo;
    }

}
